<div class="overflow-auto">
  <table class="table mt-2 rounded-box" id="shop_table" data-component="table">
    <thead>
      <tr>
        <th>
          <span class="text-sm font-medium text-base-content/80">Name</span>
        </th>
        <th>
          <span class="text-sm font-medium text-base-content/80">Email</span>
        </th>
        <th>
          <span class="text-sm font-medium text-base-content/80">Role</span>
        </th>
      </tr>
    </thead>
    <tbody>
      <% account_users.each do |account_user| %>
        <tr class="cursor-pointer hover:bg-base-200/40">
          <td>
            <div class="font-medium"><%= account_user.user.name %></div>
          </td>
          <td>
            <div class="font-medium"><%= account_user.user.email %></div>
          </td>
          <td>
            <div class="font-medium"><%= account_user.user_id == current_account.owner_id ? "Owner" : "Member" %></div>
          </td>
          <td>
            <% unless account_user.user_id == current_account.owner_id %>
              <div class="text-sm capitalize">
                <%= button_to account_user_path(account_user), method: :delete, data: { confirm: "Are you sure?" }, class: "btn btn-square btn-sm btn-danger min-w-max" do %>
                  <iconify-icon icon="lucide:trash" height="18" class="text-error"></iconify-icon>
                <% end %>
              </div>
            <% end %>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>
</div>
                   
